package com.dsh.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dsh.common.utils.PageUtils;
import com.dsh.gulimall.product.entity.AttrEntity;
import com.dsh.gulimall.product.vo.AttrGroupRelationVo;
import com.dsh.gulimall.product.vo.AttrRespVo;
import com.dsh.gulimall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author dsh
 * @email 3090930041@qq.com
 * @date 2022-04-24 22:23:11
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    /**
     *  分页查询 模糊条件查询
     * @param params
     * @param catelogId
     * @return
     */
    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId,String type);

    /**
     * 修改详细信息
     * @param attrId
     * @return
     */
    AttrRespVo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attr);

    List<AttrEntity> getRelationAttr(Long attrGroupID);

    void deleteRelation(AttrGroupRelationVo[] relationVo);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);

    List<Long> selectSearchAttrs(List<Long> attrIds);
}

